home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 247_02 / mirdef.h32 < prev    next >
Text File  |  1989-04-17  |  2KB  |  53 lines

  1. /* 
  2.  *   MIRACL definitions - mirdef.h
  3.  *   This version suitable for use with most 32-bit computers
  4.  *   e.g. VAX11/780 
  5.  */
  6. #define small int
  7.                             /* smalls are usually ints, but see  *
  8.                              * bnmuldv.any                       */
  9.  
  10. #define MAXNUM  1073741824L 
  11.                             /* =2^[L-2] where L is the number    *
  12.                              * of bits in a 'long' data type     */
  13.  
  14. #define MAXBASE 1073741824  
  15.                             /* = 2^[W-2] where W is the number   *
  16.                              * of bits in a small and L>=2W OR   *
  17.                              * if double-small sized integer is  *
  18.                              * available at machine code level   *
  19.                              * and muldiv is written in assembly *
  20.                              * language to take advantage of it. *
  21.                              * Otherwise = 2^[(W/2)-1]           */
  22.  
  23. #define TOOBIG  1073741824
  24.                             /* = 2^[I-2] where I is the number   *
  25.                              * of bits in an 'int'               */
  26.  
  27. #define MSK     0xFFFF      
  28.                             /* 2^(W/2) - 1                       */
  29. #define BTS     16         
  30.                             /* (W/2)                             */
  31. #define WPERD   2
  32.                             /* (Bits in double mantissa)/(W-2)   */
  33. #define BIGGEST 1.0E38
  34.                             /* biggest representable double      */
  35. #define IBSIZ   132
  36.                             /* Input buffer size                 */
  37. #define OBSIZ   256        
  38.                             /* Output buffer size                */
  39.  
  40.                /* some useful definitions */
  41.  
  42. #define bool int
  43. #define forever for(;;)   
  44. #define sign(x) ((x)<0? (-1) : 1)
  45. #define abs(x)  ((x)<0? (-(x)) : (x))
  46. #define FALSE 0
  47. #define TRUE 1
  48. #define OFF 0
  49. #define ON 1
  50. #define PLUS 1
  51. #define MINUS (-1)
  52.  
  53.